package com.my.spvideo.dao.mysql.baidumv;

import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.my.spvideo.vo.Business;
import com.my.spvideo.vo.Company;



public interface BusinessMapper {
	
	/**
	 * 初次展示
	 * 
	 * @param startNum
	 * @param pageSize
	 * @return
	 */
	public List<Business> getBusinessList(@Param("startNum") int startNum, @Param("pageSize") int pageSize,
			@Param("name") String name,
			@Param("roleId") int roleId,
			@Param("businessId") int businessId);
	
	/**
	 * 数量
	 * 
	 * @return
	 */
	public int getBusinessListCount(@Param("name") String name,
									@Param("roleId") int roleId,
									@Param("businessId") int businessId);

	
	
	/**
	 * 商务对应用户名
	 * 
	 * @return
	 */
	public String getUserName(@Param("userId") int userId);
	
	
	/**
	 * 添加信息
	 * 
	 * @param cpInfo
	 * @return
	 */
	public int insertBusinessInfo(@Param("Business") Business business);

	
	/**
	 * 删除信息
	 * 
	 * @param id
	 * @return
	 */
	public int deleteBusiness(int id);
	
	/**
	 * 查询商务id
	 * 
	 * @param id
	 * @return
	 */
	public int selectBusinessId(int userId);
	
	/**
	 * 根据id查询信息
	 * 
	 * @param id
	 * @return
	 */
	public Business selectOne(int businessId);
	
	
	/**
	 * 更新信息
	 * 
	 * @param cpInfo
	 * @return
	 */
	public int updateCompany(@Param("Company") Company company);

	
	List<Company> selectCompanyName();
	
	Company selectCompany(int id);
	
	Company selectCompanyByUserId(@Param("userId") int userId);

	List<Business> selectBusinessLeader(@Param("businessId") int businessId);
	
	List<Integer> selectCompanyId(@Param("id")int id,@Param("businessLeader")String businessLeader);
	
}
